<template>

    <el-carousel >
        <el-carousel-item v-for="item in lunboList" :key="item">
            <!-- <h3 class="small justify-center" text="2xl">{{ item }}</h3> -->
            <img style="width:100%" :src=" vite_url + '/storage/' + item.src " alt="">
        </el-carousel-item>
    </el-carousel>
    
</template>

<script lang="ts" setup>

import { ref } from 'vue';
import axios from 'axios';
const vite_url:string = window.VITE_URL
const lunboList:any = ref<Array<object>>()
const get_lunbo_list = () => {


    // const url = vite_url + '/cms/home/slide';
    const url = vite_url + '/cms/home/banner';
    
    // console.log(url,data)
    axios.get( url ).then( (res:any) => {
        
        lunboList.value = res.data;

    });
    
}
get_lunbo_list();
</script>  
<style scoped>
.demonstration {
    color: var(--el-text-color-secondary);
}

.el-carousel__item h3 {
    color: #475669;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
    text-align: center;
}

.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
    background-color: #d3dce6;
}


</style>
<style>
.el-carousel .el-carousel__container{
    /* height:auto; */
    height:42vw;
}
</style>
